The directory module is built into AWS, and is used to map a URL tree to a tree of files on disk. It has one argument, the directory that the URL prefix is to refer to. For instance, if you have one tree that is at HTML:, you would use the single directory map:
map / directory html:
It's not uncommmon to have more than one tree, especially if more than one user wants to have documents served by AWS. You can simulate the very popular /~username style for user1 and user2 like so:
map /~user1/ directory users:user1/ map /~user2/ directory users:user2/
Finally, the directory module does not report an error if the file does not exist. This allows you to have multiple directories that appear to be overlaid one on top of each other, to be checked in order. For instance, if you want to update some elements of a directory tree without updating them all, and make sure users get new elements if they were available, you could do something like this:
map /CoolStuff/ directory HTML:CoolStuff/ map /CoolStuff/ directory HTML:CoolStuff-old/